import java.util.regex.Pattern;

/**
 * @author dreamcatcher
 * @date 2022/3/2 21:52
 * Pattern类
 */
public class RegExp11 {
    public static void main(String[] args) {
        String content = "hello world";
        String regex1 = "hello";
        String regex2 = "hello.*";
        System.out.println(Pattern.matches(regex1, content));
        System.out.println(Pattern.matches(regex2, content));
    }
}